<template>
    <el-form-item :label="props.component.title" :rules="props.component.rules" :disabled="props.component?.disabled"
        :validate-status="props.component?.validateStatus" :label-width="props.component?.labelWidth"
        :prop="props.customField ?? props.component.dataIndex"
        :size="props.component?.size ?? 'default'" :class="[props.component?.customClass]"><slot></slot>
    </el-form-item>
</template>

<script setup>
import { inject } from 'vue'
const options = inject('options')
const props = defineProps({
    component: Object,
    customField: { type: String, default: null }
})
</script>